OpenGL SuperBible: Comprehensive Tutorial and Reference, Seventh Edition by Graham Sellers Richard S. Wright Jr. Nicholas Haemel

OpenGL SuperBible: Comprehensive Tutorial and Reference, Seventh Edition by Graham Sellers Richard S. Wright Jr. Nicholas Haemel

Author:Graham Sellers, Richard S. Wright Jr., Nicholas Haemel
Language: eng
Format: epub
Publisher: Addison-Wesley Professional
Published: 2015-08-24T04:00:00+00:00


Logical Operations

Once the pixel color is in the same format and bit depth as the framebuffer, there are two more steps that can affect the final result. The first allows you to apply a logical operation to the pixel color before it is passed on. When logical operations are enabled, the effects of blending are ignored. Logic operations do not affect floating-point buffers. You can enable logic ops by calling

glEnable(GL_COLOR_LOGIC_OP);

and disable them by calling

glDisable(GL_COLOR_LOGIC_OP);

Logic operations use the values of the incoming pixel and the existing framebuffer to compute a final value. You can pick the operation that computes the final value by calling glLogicOp(). The possible options are listed in Table 9.6. The prototype of glLogicOp() is

glLogicOp(GLenum op);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.